package com.hbzjt2012.lesson06;

import javax.swing.*;
import java.awt.*;

public class TestTextDemo03 extends JFrame {

    public TestTextDemo03(){
        Container container = this.getContentPane();


        // 文本域
        JTextArea textArea = new JTextArea(20,50);
        textArea.setText("欢迎学习Java GUI 编程");

        // Scroll面板
        JScrollPane jScrollPane = new JScrollPane(textArea);
        container.add(jScrollPane);

        this.setVisible(true);
        this.setSize(500,350);
        this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }

    public static void main(String[] args) {
        new TestTextDemo03();

    }
}

